package com.atguigu.gulimall.auth.feign;

import com.atguigu.common.utils.R;
import com.atguigu.gulimall.auth.param.SocialUser;
import com.atguigu.gulimall.auth.param.UserLoginParam;
import com.atguigu.gulimall.auth.param.UserRegistParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Description :
 * @Author : mayp
 * @Date: 2020-11-09 15:27
 */
@FeignClient("gulimall-member")
public interface MemberFeignService {

    /**
     * 注册远程调用
     * @param vo
     * @return
     */
    @PostMapping("/member/member/regist")
    R regist(@RequestBody UserRegistParam vo);

    /**
     * 账户密码登录远程调用
     */
    @PostMapping("/member/member/login")
     R login(@RequestBody UserLoginParam vo);

    /**
     * 社交登录远程调用
     */
    @PostMapping("/member/member/oauth2/login")
    R oauthLogin(@RequestBody SocialUser vo);
}
